EngineException

open class EngineException(message: String, val code: String = "", val category: String = "", val hint: String = "", docs: String = "", val args: Map<String, Any> = emptyMap(), val silent: Boolean = false) : RuntimeException

Structured engine error surfaced from the native side.

The structured fields (code, category, hint, docsUrl, args, silent) are populated from the engine's error catalog. Every engine error carries a stable, non-empty code; as a defensive measure code may be empty — treat it the same as any other unrecognized code rather than crashing on it.

Existing callers that only read message keep working — the new fields have default values preserving the previous source compatibility of EngineException(message).

try {
engine.scene.create()
} catch (e: EngineException) {
when (e.code) {
"SCENE.NOT_VALID" -> toast("No scene is loaded.")
else -> toast(e.message ?: "Unknown error")
}
e.docsUrl?.let { openBrowser(it) }
}

Inheritors

Constructors

Link copied to clipboard
constructor(message: String, code: String = "", category: String = "", hint: String = "", docs: String = "", args: Map<String, Any> = emptyMap(), silent: Boolean = false)

Properties

Link copied to clipboard

Typed template arguments. Values are Boolean, Long, Double, or String (preserved across the JNI boundary).

Link copied to clipboard

Category prefix derived from code (e.g. "SCENE"). Empty when code is empty.

Link copied to clipboard
open val cause: Throwable?
Link copied to clipboard

Stable catalog id (e.g. "SCENE.NOT_VALID"). Empty only as a defensive fallback.

Link copied to clipboard

Fully-qualified docs URL using the Android docs base, e.g. https://img.ly/docs/cesdk/android/user-interface/font-size-d194d1/. null when docs is empty.

Link copied to clipboard

English developer-facing "what to do next" hint, already interpolated. Empty when none.

Link copied to clipboard
open val message: String?
Link copied to clipboard
val silent: Boolean = false

Catalog silent flag — expected platform limitation that should not be logged.

Functions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard